package com.fulihui.wgj.facade.service.reply;

import com.fulihui.common.error.InvokeServiceException;
import com.fulihui.common.request.rpc.AppRequest;
import com.fulihui.common.result.rpc.BaseResult;
import com.fulihui.common.result.rpc.SimpleResult;
import com.fulihui.wgj.facade.dto.WxSubscribeReplyRuleDTO;
import com.fulihui.wgj.facade.dto.WxSubscribeReplyRulePreDTO;
import com.fulihui.wgj.facade.request.PrimaryKeyRequest;
import com.fulihui.wgj.facade.request.reply.ReplyRuleEnableOrDisableRequest;
import com.fulihui.wgj.facade.request.reply.WxSubscribeReplyRuleQueryRequest;
import com.fulihui.wgj.facade.request.reply.WxSubscribeReplyRuleSaveRequest;
import com.fulihui.wgj.facade.request.reply.WxSubscribeReplyRuleUpdateRequest;

import java.util.List;

/**
 * 关注回复Service
 *
 * @author wang_wx
 * @date 2018-07-03
 */
public interface WxSubscribeReplyService {

    /**
     * 查询关注回复
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    SimpleResult<List<WxSubscribeReplyRuleDTO>> queryReplyRule(WxSubscribeReplyRuleQueryRequest request) throws InvokeServiceException;

    /**
     * 查询关注回复--有效
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    SimpleResult<List<WxSubscribeReplyRuleDTO>> queryReplyRuleByAppIdUseful(AppRequest request) throws InvokeServiceException;

    /**
     * 更新关注回复
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    BaseResult updateReplyRuleById(WxSubscribeReplyRuleUpdateRequest request) throws InvokeServiceException;

    /**
     * 启用or禁用回复规则
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    BaseResult enableOrDisable(ReplyRuleEnableOrDisableRequest request) throws InvokeServiceException;

    /**
     * 根据主键查询回复规则
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    SimpleResult<WxSubscribeReplyRuleDTO> queryRuleById(PrimaryKeyRequest request) throws InvokeServiceException;

    /**
     * 根据主键查询回复预览
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    SimpleResult<WxSubscribeReplyRulePreDTO> queryRulePreview(PrimaryKeyRequest request) throws InvokeServiceException;

    /**
     * 根据ID删除用户关注回复
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    BaseResult deleteReplyRuleById(PrimaryKeyRequest request) throws InvokeServiceException;

    /**
     * 保存回复规则
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    BaseResult saveReplyRule(WxSubscribeReplyRuleSaveRequest request) throws InvokeServiceException;
}
